﻿using System.Text.Json.Serialization;

namespace MyJWT
{
    public class Header
    {
        [JsonPropertyName("alg")]
        public string Algorithm { get; set; } = "hs256";
        [JsonPropertyName("typ")]
        public string Type { get; set; } = "jwt";
    }

    public class Payload
    {
        [JsonPropertyName("iss")]
        public string Issuer { get; set; }
        [JsonPropertyName("sub")]
        public string Subject { get; set; }
        [JsonPropertyName("aud")]
        public string Audience { get; set; }
        [JsonPropertyName("exp")] 
        public string ExpireationTime { get; set; }
        [JsonPropertyName("nbf")]
        public string NotBefore { get; set; }
        [JsonPropertyName("iat")] 
        public string IssuedAt { get; set; }
        [JsonPropertyName("jti")] 
        public string JWTID { get; set; }
        [JsonPropertyName("data")]
        public object Data { get; set; }
    }
}
